package com.xxx.seckill.service;

import com.xxx.seckill.pojo.TOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xxx.seckill.pojo.TUser;
import com.xxx.seckill.vo.GoodsVo;
import com.xxx.seckill.vo.OrderDetailVo;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author XXX
 * @since 2023-01-04
 */
public interface TOrderService extends IService<TOrder> {


    /**
     * 校验验证码是否正确
     * @param user
     * @param goodsId
     * @param captcha
     * @return
     */
    Boolean checkCaptcha(TUser user, Long goodsId, String captcha);

    /**
     * 校验
     * @param user
     * @param goodsId
     * @param path
     * @return
     */
    Boolean checkPath(TUser user, Long goodsId, String path);

    /**
     * 秒杀获取地址
     * @param user
     * @param goodsId
     * @return
     */
    String createPath(TUser user, Long goodsId);


    /**
     * 订单详情
     * @param orderId
     * @return
     */
    OrderDetailVo detail(Long orderId);

    /**
     * 秒杀
     * @param user
     * @param goods
     * @return
     */
    TOrder seckill(TUser user, GoodsVo goods);


    
}
